bbbbbbbbb bbbbbbbbb bbbwwwbbb bbbw.wbbb bbbwwwbbb bbbw.wbbb bbbwwwbbb bbbbbbbbb bbbbbbbbb
First dead pieces are removed (captured), then the board is scored:
board after removals: ......... ......... ...www... ...w.w... ...www... ...w.w... ...www... ......... ......... blackRemovedCount = 66 whiteRemovedCount 0 score (black - white) not including removals = -68During dead piece removal the cellular automata update converts 'b' (black piece) or 'w' (white piece) to 'B' or 'W' if it is adjacent to a '.' (empty point) or another 'B' or 'W'. After 2*(boardSize-1) steps the cellular automata will have propagated the information about connectivity to empty points across the entire board. Pieces which have not been capitalized are removed.
During scoring the cellular automata marks empty points adjacent to pieces or claimed points with 'B' or 'W' to indicate ownership. If both sides claim the point it is marked as 'X' and neither side counts it. After 2*(boardSize-1) steps the cellular automata will have propagated the information about ownership across the entire board.
Ruby code implementing these cellular automata is available here. This code includes optional C code called by Ruby which accelerates board scoring by 200x.